<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 <html xmlns="http://www.w3.org/1999/xhtml">

 <head>
 <title>Linux Commands</title>
 <link rel="stylesheet" type="text/css" href="../css/main.css" />
 </head>

 <body>
 <div id=big-container>
	 <div id=container>
	 	<div id=header>
	 		<div id=top_navigation_bar>
	 			
			</div>	
			<div id=navigation_links>
				<p><a href="index.html">Home</a></p>
				<p><a href="commands.html">Commands</a></p>
				<p>Softwares</p>
				<p>References</p>
			</div>
	 	</div>
	 	
	 	<div id=content>
	 		<div id=left_panel class="middle_commands">
				<!-- Command description goes here -->
				<b>Linux Commands > cat</b>
				<h3><b>cat</b></h3>
				<p>Concatenate and print (display) the content of files.</p>

<b>Syntax</b>
      <p><code>cat [Options] [File]...</code></p>

<p>Concatenate FILE(s), or standard input, to standard output.</p>
<ul>

<li>  -A, --show-all           equivalent to -vET</li>

<li>  -b, --number-nonblank    number nonblank output lines</li>

<li>  -e                       equivalent to -vE</li>

<li>  -E, --show-ends          display $ at end of each line</li>

<li>  -n, --number             number all output lines</li>

<li>  -s, --squeeze-blank      never more than one single blank line</li>

<li>  -t                       equivalent to -vT</li>

<li>  -T, --show-tabs          display TAB characters as ^I</li>

<li>  -u                       (ignored)</li>

<li>  -v, --show-nonprinting   use ^ and M- notation, except for LFD and TAB</li>

	<ul> 	
 	<li>    --help               display this help and exit </li>

    <li>  --version            output version information and exit </li>
	</ul>
</ul>
<p>With no FILE, or when FILE is -, read standard input.</p>

<h4>Examples:</h4>
<div class="example">
	<p>Display a file (this actually works by concatenating the file with STDOUT)</p>
	<code>$ cat myfile.txt</code>

	<p>Concatenate two files:</p>	
	<code>$ cat File1.txt File2.txt > union.txt</code>

	<p>If you need to combine two files but also eliminate duplicates, this can be done with sort unique:</p>
	<code>$ sort -u File1.txt File2.txt > unique_union.txt</code>

	<p>Put the contents of a file into a variable</p>	
	<code>$ my_variable=`cat File3.txt`</code>				
</div>				
</div>
	 		<div id=right_panel>
				<!-- Command List goes here -->	 			
	 			<h3>Command List</h3>
	 			
				<a href="apt-get.html">apt-get</a>
				<a href="aptitude.html">aptitude</a>
				<a href="cat.html">cat</a>
				<a href="cd.html">cd</a>
				<a href="chmod.html"> chmod </a>
				<a href="chown.html"> chown </a>
				<a href="clear.html"> clear </a>
				<a href="cp.html"> cp </a>
				<a href="df.html"> df </a>
				<a href="find.html"> find </a>
				<a href="gksu.html"> gksu </a>
				<a href="grep.html"> grep </a>
				<a href="halt.html"> halt </a>
				<a href="ifconfig.html"> ifconfig </a>
				<a href="ls.html"> ls </a>
				<a href="man.html"> man </a>
				<a href="mv.html"> mv </a>
				<a href="passwd.html"> passwd </a>
				<a href="shutdown.html"> shutdown </a>
				<a href="sudo.html"> sudo </a>
				<a href="tar.html"> tar </a>
				<a href="touch.html"> touch </a>
				<a href="quota.html"> quota </a>
				<a href="wget.html"> wget </a>
	 		</div>
	 	</div>
	 	<div id=footer>
	 		<p>Copyright &copy; 2011 - Sohan Akolkar - All right included.</p>
	 	</div>
	  </div> 
  </div>
 </body>

 </html>
 
